package com.cv.platform.controller.platform.carousel;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.controller.platform.carousel.vo.CvVideoCarouselRespVO;
import com.cv.platform.service.carousel.CvVideoCarouselService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.List;

/**
 * 视频平台 - 轮播图控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 轮播图控制层")
@RestController
@RequestMapping("/platform/video/carousel")
public class CvVideoCarouselController {

    @Resource
    private CvVideoCarouselService cvVideoCarouselService;

    @GetMapping("list")
    @Operation(summary = "获取视频轮播图列表（视频平台 - 展示轮播图）")
    @PermitAll
    public Result<List<CvVideoCarouselRespVO>> list() {
        return Result.success(cvVideoCarouselService.getAllList());
    }

}
